<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class  CreateShippingTemplatesTable extends Migration
{
    /**
     * 运费模板表
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shipping_templates', function (Blueprint $table) {
            $table->id()->comment('运费模板表');
            $table->string('name')->comment('模板名称');
            $table->tinyInteger('appoint')->comment('指定包邮:0关闭 1开启');
            $table->integer('sort')->default(0)->comment('排序');
            $table->string('type',16)->comment('计费方式:type_one 按件数, type_two 按重量, type_three 按体积');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shipping_templates');
    }
}
